package com.hyk.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hyk.domain.SysPrivilege;
import com.hyk.mapper.SysPrivilegeMapper;
import com.hyk.service.SysPrivilegeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Set;

@Service
public class SysPrivilegeServiceImpl extends ServiceImpl<SysPrivilegeMapper, SysPrivilege> implements SysPrivilegeService{

    @Resource
    private SysPrivilegeMapper sysPrivilegeMapper;

    @Override
    public void removeByRoleId(String roleId) {
        sysPrivilegeMapper.removeByRoleId(roleId);
    }

    @Override
    public Set<Long> findMenuIdByPrivilegeId(List<Long> privileges) {
        return sysPrivilegeMapper.findMenuIdByPid(privileges);
    }
}
